<?php

namespace App\Models;

trait HasChinaAreaTrait
{
    public function province()
    {
        return $this->belongsTo(ChinaArea::class, "province_code", "code");
    }

    public function city()
    {
        return $this->belongsTo(ChinaArea::class, "city_code", "code");
    }

    public function district()
    {
        return $this->belongsTo(ChinaArea::class, "district_code", "code");
    }
}